<script setup>
import treeMenu from '../components/treeMenu.vue'
//获取路由数据
import { useRouter } from 'vue-router';
import {reactive} from 'vue'
//获取仓库数据
import  useMenuStore  from '../store/modules/menu';
const menuStore =useMenuStore ();
const router =useRouter()
const menuData=reactive(router.options.routes[0].children)
const handleOpen=()=>{}
const handleClose=()=>{}




</script>

<template>
    <el-menu :style="{width: !menuStore.isCollapse ? '200px' :'64px'}" active-text-color="#ffd04b" background-color="#545c64" class="aside-container" default-active="2"
        text-color="#fff" @open="handleOpen" @close="handleClose"  :collapse="menuStore.isCollapse" >
        <p class="login-lg">{{menuStore.isCollapse ? 'DIDI':'DIDI陪诊'}}</p>
        <treeMenu :index="1" :menuData="menuData"></treeMenu>
    </el-menu>
</template>

<style lang="less" scoped>
.aside-container {
    height: 100%;

    .login-lg {
        font-size: 20px;
        text-align: center;
        height: 50px;
        line-height: 50px;
        color: #fff;
    }

}
</style>